package org.leo.test.guava.eventbus.day1;

import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;


/**
 * <p>
 *
 * </p>
 *
 * @Package: org.leo.test.guava.eventbus.t1
 * @ClassName: SimpleListener
 * @author: Li.Junlin
 * @date: 2019.12.13 17:15
 */
@Slf4j
public class SimpleListener {

    /**
     * 一个简单的Listener方法
     * @param event Guava规定此处只能有一个参数
     */
    @Subscribe
    public void doAction(final String event){
        if (log.isInfoEnabled()){
            log.info("Received event [{}] and will take a action", event);
        }
    }
}
